# files/forms.py
from django import forms
from .models import File

class FileUploadForm(forms.ModelForm):
    class Meta:
        model = File
        fields = ['name', 'file']  # 仅展示用户需填写的字段（uploaded_by/uploaded_at/size自动生成）
        labels = {
            'name': '文件名',
            'file': '选择文件',
        }